package com.sg.dto.biz.component.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc NodeGraphDatabaseDto
 * @使用场景
 */
@Data
public class NodeGraphDatabaseDto extends BaseDto implements Serializable {

    /**
     * 节点ID（唯一标识）
     */
    @ApiModelProperty("节点ID（唯一标识）")
    private String nodeId;

    /**
     * 节点类型 FILE:文档 MEDIA_CONTENT:媒体内容 OTHER:其它
     */
    @ApiModelProperty("节点类型")
    private String nodeType;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        NodeGraphDatabaseDto that = (NodeGraphDatabaseDto) o;
        return nodeId == that.nodeId && nodeType == that.nodeType;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), nodeId, nodeType);
    }

}
